package com.hnust.fiveonesix.Mapper.LogiorRegiMapper;

import com.hnust.fiveonesix.POJO.LoginInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

@Component
public interface LoginMapper {
    @Select("select * from UserLogin where UserName like #{username}")
    LoginInfo getUserinfo(String username);

    @Update("update UserLogin set UserPwd = #{userPwd} where UserName = #{username}")
    void charpwd(String username,String userPwd);
    @Insert("insert into UserLogin values(#{username},#{userpwd})")
    void inserUserinfo(String username,String userpwd);
}
